package com.chris.action;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.ServletActionContext;

import com.chris.bean.User;
import com.chris.service.impl.UserManageImpl;
import com.opensymphony.xwork2.ActionSupport;

public class Ajax_UserAction extends ActionSupport {
	private static final long serialVersionUID = 1L;
	private User us;
	private UserManageImpl userManage;

	public String findUser() {
		HttpServletRequest request = ServletActionContext.getRequest();
		String gid = (String) request.getAttribute("id");
		int id = 0;
		if (gid != null && "".equals(gid)) {
			id = Integer.parseInt(gid);
		}
		us = this.userManage.findByUserId(id);
		System.out.println("find");
		return "jsons";
	}

	public User getUs() {
		return us;
	}

	public void setUs(User us) {
		this.us = us;
	}

	public UserManageImpl getUserManage() {
		return userManage;
	}

	public void setUserManage(UserManageImpl userManage) {
		this.userManage = userManage;
	}

}
